![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@ariesclark/array
Advanced tools
Fast, efficient, and easy-to-use array extensions for TypeScript.
npm install @ariesclark/extensions
# Or directly, if you only need the array extension.
npm install @ariesclark/array
group
(function)Groups the items in the array by the given function.
group([1, 2, 3, 4, 5], item => (item % 2 === 0 ? 'even' : 'odd'));
// {
// odd: [1, 3, 5],
// even: [2, 4]
// }
randomIndex
(function)Get a random index from an array, with an optional random number generator.
Parameters:
{ length: 0; }
)RandomFunction
)returns: null
const value = ['lorem', 'ipsum', 'dolor', 'sit', 'amet'];
randomIndex(value); // 3, eventually.
randomIndex(value); // 0, eventually.
randomIndex(value); // 2, eventually.
randomIndex
(function)Parameters:
{ length: number; }
)RandomFunction
)returns: null
randomIndex
(function)Parameters:
{ length: number; }
)RandomFunction
)returns: null
randomItem
(function)Get a random item from an array, with an optional random number generator.
Parameters:
{ length: 0; }
)RandomFunction
)returns: null
const value = ['lorem', 'ipsum', 'dolor', 'sit', 'amet'];
randomItem(value); // "amet", eventually.
randomItem(value); // "dolor", eventually.
randomItem(value); // "lorem", eventually.
randomItem
(function)Parameters:
{ [index: number]: T; length: number; }
)RandomFunction
)returns: null
randomItem
(function)Parameters:
{ [index: number]: T; length: number; }
)RandomFunction
)returns: null
unique
(function)Returns a new array with unique values based on the by
function.
Parameters:
T[]
)(value: T) => unknown
)returns: T[]
{ from, fromAsync, isArray, of }
(variable)FAQs
Fast, efficient, and easy-to-use array extensions for TypeScript.
We found that @ariesclark/array demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.